home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / util_file.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-06-07  |  2.2 KB  |  69 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef _UTIL_FILE_H
  8. #define _UTIL_FILE_H
  9.  
  10. #include "scribusapi.h"
  11.  
  12. class QDataStream;
  13. class QString;
  14. class ScStreamFilter;
  15.  
  16. /**
  17. * @brief Copy a source file to a target
  18.    * 
  19.    * This function copy a file to a destination. If destination exists, 
  20.    * the target file is overwritten.
  21.    *
  22.    * @param  source the source file
  23.    * @param  target the target file
  24.    * @return true on success, false on failure.
  25. **/
  26. bool SCRIBUS_API copyFile(const QString& source, const QString& target);
  27. /**
  28. * @brief Copy a source file to a target using atomic operations
  29.    * 
  30.    * This function copy a file to a destination using atomic operations. 
  31.    * If destination exists, the target file is overwritten.
  32.    *
  33.    * @param  source the source file
  34.    * @param  target the target file
  35.    * @return true on success, false on failure.
  36. **/
  37. bool SCRIBUS_API copyFileAtomic(const QString& source, const QString& target);
  38. /**
  39. * @brief Copy a source file to a stream filter
  40.    * 
  41.    * This function copy a file to a stream filter. The target filter has
  42.    * to be opened before the function call.
  43.    *
  44.    * @param  source the source file
  45.    * @param  target the target filter
  46.    * @return true on success, false on failre.
  47. **/
  48. bool SCRIBUS_API copyFileToFilter(const QString& source, ScStreamFilter& target);
  49. /**
  50. * @brief Copy a source file to a data stream
  51.    * @param  source the source file
  52.    * @param  target the target stream
  53.    * @return true on success, false on failre.
  54. **/
  55. bool SCRIBUS_API copyFileToStream(const QString& source, QDataStream& target);
  56. /**
  57. * @brief Move a source file to a destination
  58.    * 
  59.    * This function move a file to a destination. The source file is deleted
  60.    * when done.
  61.    *
  62.    * @param  source the source file
  63.    * @param  target the target file
  64.    * @return true on success, false on failre.
  65. **/
  66. bool SCRIBUS_API moveFile(const QString& source, const QString& target);
  67.  
  68. #endif
  69.